//
//  OcrPlatformView_Test.h
//  ocr_plugin
//
//  Created by FXY on 2022/7/25.
//

#import "OcrPlatformView.h"

#import "OcrCam.h"
#import "OcrThreadSafeFlutterResult.h"

/// Methods exposed for unit testing.
@interface OcrPlatformView ()

/// All OcrCam's state access and capture session related operations should be on run on this queue.
@property(nonatomic, strong) dispatch_queue_t captureSessionQueue;

/// An internal camera object that manages camera's state and performs camera operations.
//@property(nonatomic, strong) OcrCam *camera;

/// Inject @p FlutterTextureRegistry and @p FlutterBinaryMessenger for unit testing.
//- (instancetype)initWithRegistry:(NSObject<FlutterTextureRegistry> *)registry
//                       messenger:(NSObject<FlutterBinaryMessenger> *)messenger
//    NS_DESIGNATED_INITIALIZER;

/// Hide the default public constructor.
- (instancetype)init NS_UNAVAILABLE;

/// Handles `FlutterMethodCall`s and ensures result is send on the main dispatch queue.
///
/// @param call The method call command object.
/// @param result A wrapper around the `FlutterResult` callback which ensures the callback is called
/// on the main dispatch queue.
- (void)handleMethodCallAsync:(FlutterMethodCall *)call result:(OcrThreadSafeFlutterResult *)result;

/// Called by the @c NSNotificationManager each time the device's orientation is changed.
///
/// @param notification @c NSNotification instance containing a reference to the `UIDevice` object
/// that triggered the orientation change.
//- (void)orientationChanged:(NSNotification *)notification;

@end
